import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'loading_state.dart';

class LoadingHelper {
  static void show(BuildContext context, {String? message}) {
    final loadingState = Provider.of<LoadingState>(context, listen: false);
    loadingState.showLoading(message: message);
  }

  static void hide(BuildContext context) {
    final loadingState = Provider.of<LoadingState>(context, listen: false);
    loadingState.hideLoading();
  }
}